#ifndef GLOBALCONFIG_H_INCLUDED
#define GLOBALCONFIG_H_INCLUDED

#include "Params.h"

#define VERSION 0.94

#ifndef __WXDEBUG__
    //#define XML_WTF
    #define HTTP_WTF
#endif
#define UNIT_TEST

#define SIGN_METHOD "HMAC-SHA1"
#define OAUTH_VERSION "1.0"
#define REQUEST_TOKEN_API "http://api.t.sina.com.cn/oauth/request_token"
#define ACCESS_TOKEN_API "http://api.t.sina.com.cn/oauth/access_token"
#define VERIFY_REQUEST_TOKEN_API "http://api.t.sina.com.cn/oauth/authorize?oauth_token="
#define VERIFY_ACCESS_TOKEN_API "http://api.t.sina.com.cn/account/verify_credentials.xml"
#define OAUTH_CALLBACK "oob"
#define HTTP_METHOD_GET "GET"
#define HTTP_METHOD_POST "POST"

#define OAUTH_SHA1_BUFFER_SIZE 64

#define GUI_DEPENDENT
#ifdef GUI_DEPENDENT
    #define PULSE_MAX 50
    #define PULSE_UNIT 5
#endif

#define RATE_LIMIT_DB
#define MAX_RETRY_ON_CORRUPT 5
#define HTTP_RETRY_WAIT_SEC 2
#define HTTP_TIME_OUT_SEC 5

#ifndef INIT_RECORD_COUNT
    #define INIT_RECORD_COUNT 20
#endif
#ifndef GET_ID_COUNT
    #define GET_ID_COUNT 50
#endif




//#define _DEBUG
/*
#ifdef _DEBUG
    #define HTTP_DEBUG
    #define SQL_DEBUG
    #define RATE_LIMIT_DEBUG
    #define LOGIN_DEBUG
    #define XML_DEBUG
#endif
*/

#define _LOG
#ifdef _LOG
    #define HTTP_LOG
    #define SQL_LOG
    #define RATE_LIMIT_LOG
    #define LOGIN_LOG
    #define XML_LOG
    #define BLOB_REQ_LOG
    #define MT_LOG
    #define OAUTH_LOG

    #ifdef HTTP_LOG
        //#define HTTP_DEBUG_LOG
    #endif

    #ifdef SQL_LOG
        //#define SQL_DEBUG_LOG
    #endif

    #ifdef RATE_LIMIT_LOG
       //#define RATE_LIMIT_DEBUG_LOG
    #endif

    #ifdef LOGIN_LOG
        //#define LOGIN_DEBUG_LOG
    #endif

    #ifdef XML_LOG
        //#define XML_DEBUG_LOG
    #endif

    #ifdef MT_LOG
        //#define MT_DEBUG_LOG
    #endif
#endif

#endif // GLOBALCONFIG_H_INCLUDED
